package edu.zut;

import java.util.Scanner;

public class scand {
    public static void main(String[] srgs) {
        System.out.println("请输入学生人数：");
        Scanner scanner=new Scanner(System.in);
        int scan=scanner.nextInt();
        int[] score = new int[scan];
        for (int i = 0; i < score.length; i++) {
            System.out.println("请输入第" + (i + 1) + "名同学的成绩:");
            score[i] = scanner.nextInt();
        }
        for (int i = 0; i < score.length; i++) {
            System.out.printf(score[i] + " ");
        }
        System.out.println();
        int j = 0;
        while (j < scan) {
            if (score[j] <= 100 & score[j] >= 0) {
                if (score[j] >= 90) {
                    System.out.println("优秀");
                } else if (score[j] >= 60) {
                    System.out.println("合格");
                } else {
                    System.out.println("不合格");
                }
            } else {
                System.out.println("你输入的成绩不合法。");
            }
            j++;
        }
    }
}